home *** CD-ROM | disk | FTP | other *** search
- Borland Object Pascal - Getting Started Object Pascal Script
-
- Class Diagram: pascar.omt
- Script Files: pascal1.sct
- Main Files: pasuser.pas
-
- The steps to generate Borland Object Pascal code and to compile the generated files are as follows:
-
- >> Launch With Class from Windows
- >> Open pascar.omt
- >> Double click on each class to enter information in the Class Specification dialog box. Enter Unit name in
- the File Name box and enter the Uses Unit names in the Include File box. Add a semicolon to the last unit
- name
- >> Select "Generate - Generate Class Code"
- >> Select pas as the custom file extension
- >> Select pascal1.sct to generate the Pascal units
- >> Select "File - Edit File" to examine the generated files, e.g. car.pas
- >> Launch your Pascal environment
- >> Compile, make, and build each generated file, e.g. VehicleU.pas, MotorUn.pas, CellulaU.pas,
- PassengU.pas, TireUnit.pas, and CarUnit.pas.
- >> Compile, make, build and execute pasuser.pas
-
- Notes for generating Object Pascal (Turbo Pascal 5.5. or greater):
-
- (1) In With Class enter the unit name in the class specification dialog box "File Name" field. The file name
- becomes the unit file name and the unit name, e.g. file name = CarUnit.pas.
-
- (2) For uses clause, enter the unit name in the Include Box. Enter the last unit followed by a ; e.g. UnitZ;
- Ensure that the unit names entered in the Include Box are consistent with the unit names entered in the
- CLASS_FILENAME Box.
-
- (3) On the class diagram, insert parameters in the C++ form, e.g. Parameter_Type Parameter_Name - Integer
- aNumber. The script variable PASCAL_OPERATION_PARAMETERS_WITH_VAR then puts the parameter
- into the Pascal form, e.g. (Parameter_Name : Parameter_Type ; Var A_Parameter_Type : Parameter_Type) -
- (A_Number : Integer ; Var A_Integer : Integer).
-